Demystifying Internet of Things Security by Sunil Cheruvu & Anil Kumar & Ned Smith & David M. Wheeler
Author:Sunil Cheruvu & Anil Kumar & Ned Smith & David M. Wheeler
Language: eng
Format: epub
ISBN: 9781484228968
Publisher: Apress
In addition to thread execution priorities used to enforce time separation of threads, Zephyr assigns a thread privilege to each thread. There are only two privileges, supervisory and user. By default, threads are assigned the supervisory privilege. This gives threads the ability to see all devices and access all of memory. A thread can drop its supervisory privilege and become a user-privileged thread by calling k_thread_user_mode_enter(), but once becoming a user-privileged thread, it cannot regain its supervisory privileges. Threads can temporarily perform an operation at the user privilege by spawning a new thread to perform the task and setting that new thread’s privilege to the user privilege level.
Operating all or many threads at the supervisory privilege level is dangerous, since all of memory is exposed to those threads, even sensitive memory used by the kernel. User-privilege threads should be used as often as possible because Zephyr provides memory separation for user-privilege threads. Memory separation for user-privileged threads is discussed in the next section.
Since all of Zephyr’s applications and libraries are enumerated at compile time, and there is no dynamic loading of applications or dynamic linking of libraries or other code, Zephyr reduces the attack surface created by interfering applications and library code conflicts.
Why does all this matter for security? Creating threads at the right privilege level is important for a system to remain stable in the face of an attack. If all threads are running at the supervisory privilege level, an attacker only has to find a single thread that it can attack via a buffer overflow and then gain control of the whole system. An attacker with control over a supervisory thread can see all memory, halt other threads, or modify stack values to create gadgets for ROP and JOP attacks, allowing the attacker to create their own programs with new, potentially destructive, functionality.
But even if user-privileged threads are enabled, if the right segmentation of memory partitions is not performed, user threads will be able to corrupt each other’s memory partitions.
If user threads are enabled and restrictive memory partitioning is used, this will severely limit the types of attacks a remote adversary can perform. This is especially true if the threads that access the network and perform the bulk of the work on the system are user threads. But even if an attacker cannot gain access to an administrative thread, if they can take over a high enough privileged user thread, then by using k_sched_lock(), the attacker can starve out other threads. This situation can be mitigated by using the system’s watchdog timer or even creating your own watchdog thread at the Meta-IRQ level to monitor and correct misbehaving threads. A detailed discussion of this is found later in the “Security Management” section.
Download
Demystifying Internet of Things Security by Sunil Cheruvu & Anil Kumar & Ned Smith & David M. Wheeler.epub
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7784)
Grails in Action by Glen Smith Peter Ledbrook(7699)
Configuring Windows Server Hybrid Advanced Services Exam Ref AZ-801 by Chris Gill(6580)
Azure Containers Explained by Wesley Haakman & Richard Hooper(6569)
Running Windows Containers on AWS by Marcio Morales(6099)
Kotlin in Action by Dmitry Jemerov(5068)
Microsoft 365 Identity and Services Exam Guide MS-100 by Aaron Guilmette(4923)
Combating Crime on the Dark Web by Nearchos Nearchou(4505)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4416)
Microsoft Cybersecurity Architect Exam Ref SC-100 by Dwayne Natwick(4353)
The Ruby Workshop by Akshat Paul Peter Philips Dániel Szabó and Cheyne Wallace(4180)
The Age of Surveillance Capitalism by Shoshana Zuboff(3959)
Python for Security and Networking - Third Edition by José Manuel Ortega(3748)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3510)
The Ultimate Docker Container Book by Schenker Gabriel N.;(3413)
Mastering Python for Networking and Security by José Manuel Ortega(3346)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3335)
Blockchain Basics by Daniel Drescher(3299)
Learn Wireshark by Lisa Bock(3276)
